Skip to content

Bug FIX: Load/Save Translation and Rotation Flags#80

Merged
VitorSouzaLNLS merged 3 commits intomasterfrom
R-T-flags-flat-file
May 9, 2025
Merged

Bug FIX: Load/Save Translation and Rotation Flags#80
VitorSouzaLNLS merged 3 commits intomasterfrom
R-T-flags-flat-file

Conversation

@VitorSouzaLNLS
Copy link
Copy Markdown
Contributor

@VitorSouzaLNLS VitorSouzaLNLS commented Dec 9, 2024

Description:
@Gabrielrezende-asc identified a bug in the save/load functionality for pyaccel.accelerator.Accelerator objects when using pickle.

This issue was introduced in Trackcpp's PR #71 and caused Element objects to be loaded without correctly setting the t_in, t_out, r_in, and r_out flags.

Fix:
This PR resolves the issue by using the reflag_* auxiliary functions inside read_flat_file_trackcpp for corretly loading Accelerator objects from pickles in Python.
The reflag_* functions are also used in read_flat_file_tracy.

Extra:
Changes also include the use of the has_* flags inside write_flat_file_trackcpp.

@VitorSouzaLNLS VitorSouzaLNLS changed the title R t flags flat file Bug FIX: Load/Save Translation and Rotation Flags Dec 9, 2024
@VitorSouzaLNLS VitorSouzaLNLS marked this pull request as ready for review December 9, 2024 16:30
@fernandohds564
Copy link
Copy Markdown
Contributor

@xresende, @vellosok75 , @Gabrielrezende-asc , please, take a look at this one.

@VitorSouzaLNLS VitorSouzaLNLS merged commit 0400de8 into master May 9, 2025
0 of 4 checks passed
@VitorSouzaLNLS VitorSouzaLNLS deleted the R-T-flags-flat-file branch May 9, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants